//bool, Obj this, Obj other

Unit me;
Hero h;
Building bld;

me = this.AsUnit();
if(!me.IsValid()) return false;
bld = other.AsBuilding();
if(!bld.IsValid()) return false;

if(!me.IsEnemy(bld)) return false;
if(!bld.settlement.IsIndependent()) return false;
if(!bld.settlement.IsOutpost())
	if(!bld.settlement.IsTTent())
		return false;

h = me.hero;
if(h.IsValid()){
	if(me.EnemiesInSight()) return false;
	//if(h.HasItem("irage_battle")) return false;
	//if(h.HasItem("irage_battle_stand")) return false;
	//if(h.HasItem("igreat_charge")) return false;
	//if(h.HasItem("iretreat_notai")) return false;
}

return true;
